package com.one.blocks.security.authc.rememberme;

import org.springframework.security.core.userdetails.UserDetails;

import javax.servlet.http.HttpServletRequest;

/**
 * @author <a href="mailto:idler41@163.con">linfuxin</a> created on 2023-09-23 19:43:13
 */
public interface TokenService {

    UserDetails load(HttpServletRequest request);

    UserDetails load(String sessionId);

    String save(UserDetails userDetails);

    void clear(String sessionId);

    void clear(HttpServletRequest request);

    void refreshIfNecessary(HttpServletRequest request, UserDetails userDetails);
}
